﻿using System;
using System.Windows.Media.Imaging;

namespace BingWallpaper.Models.Entitys
{
    [SqlSugar.SugarTable("BingImages")]
    public class BingImagesModel : BaseEntity
    {
        /// <summary>
        /// 路径
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 全部时间
        /// </summary>
        public string FullStartDate { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public string StartDate { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        public string Copyright { get; set; }

        [SqlSugar.SugarColumn(IsIgnore = true)]
        public BitmapImage ImageBit
        {
            get
            {
                BitmapImage bitImage = new BitmapImage();
                bitImage.BeginInit();
                bitImage.UriSource = new Uri(this.Url, UriKind.Absolute);
                bitImage.EndInit();
                return bitImage;
            }
        }



    }
}